package com.heima.utils.common.thread;

import com.heima.model.wemedia.pojos.WmUser;

public class WmThreadLocalUtil {
    private final static ThreadLocal<WmUser>WM_USER_THREAD_LOCAL=new ThreadLocal<>();

    //存入线程
    public static void setUser(WmUser wmUser){
        WM_USER_THREAD_LOCAL.set(wmUser);
    }


    //拿到线程数据
    public static WmUser getWmUser() {
        return  WM_USER_THREAD_LOCAL.get();
    }

    //清理线程
    public static void  clear(){
        WM_USER_THREAD_LOCAL.remove();
    }
}
